<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="u" uri="/iuie-tag"%>
<%@ taglib prefix="sys" uri="/sys-tag" %>
<%@ taglib prefix="lui" tagdir="/WEB-INF/tags" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>小工具</title>
</head>
<lui:context/>
<u:View basePath="/res-datum/development" userJS="widgets" delayLoadJs="false">
<body>
<lui:boards>
	<lui:board width="100%" boardTitle="小工具">
		<ul class='m-fixed-tabset' id="mtabset" data-container='#mcontainer'>
		    <li data-active='true' data-target='MD5Frm'><a>MD5</a></li>
		    <li data-target='BASE64Frm'><a>BASE64</a></li>
		    <li data-target='JSONFrm'><a>JSON格式化</a></li>
		</ul>
		<ul class='m-fixed-tabset-container' id="mcontainer" style="min-height: 513px;">
		    <li data-id="MD5Frm">
		        <form id="MD5Frm" class='m-cust' style="margin-top: 10px;">
		        	<div class="form-group row m-narrow">
		        		<div class="col-sm-6 col-md-6 col-xs-6">
				        	<div class="col-sm-2 col-md-2 col-xs-2">
							    <label for="text" class="m-label required">文本</label>
							</div>
							<div class="col-sm-10 col-md-10 col-xs-10">
							    <textarea rows="3" cols="" maxlength="2000" class="form-control m-input" name="text"></textarea>
							</div>
						</div>
					</div>
					<div class="form-group row m-narrow">
		        		<div class="col-sm-6 col-md-6 col-xs-6">
		        			<div class="col-sm-2 col-md-2 col-xs-2">
							    <button class="btn btn-primary m-btn" type="button" onclick="DevWidgetsPage.toMd5()">转化</button>
							</div>
							<div class="col-sm-6 col-md-6 col-xs-6">
								<input name="value" id="value" type="text" class="form-control m-input" disabled="disabled">
							</div>
		        		</div>
		        	</div>
		        	<lui:ajax id="toMd5Ajax" url="${ctx }/datum/devWidgets/toMd5" formQuery="#MD5Frm" onSuccess="DevWidgetsPage.onConvertToMd5Succ"/>
		        </form>
		    </li>
		     <li data-id="BASE64Frm">
		        <form id="BASE64Frm" class='m-cust' style="margin-top: 10px;display:none;">
		        	<div class="form-group row m-narrow">
		        		<div class="col-sm-6 col-md-6 col-xs-6">
				        	<div class="col-sm-2 col-md-2 col-xs-2">
							    <label for="text" class="m-label required">文本</label>
							</div>
							<div class="col-sm-10 col-md-10 col-xs-10">
							    <textarea rows="3" cols="" maxlength="2000" class="form-control m-input" name="text"></textarea>
							</div>
						</div>
					</div>
					<div class="form-group row m-narrow">
		        		<div class="col-sm-6 col-md-6 col-xs-6">
		        			<div class="col-sm-2 col-md-2 col-xs-2">
							    <button class="btn btn-primary m-btn" type="button" onclick="DevWidgetsPage.toBASE64()">加密</button>
							    <button class="btn btn-primary m-btn" type="button" style="margin-top: 10px" onclick="DevWidgetsPage.fromBASE64()">解密</button>
							</div>
							<div class="col-sm-10 col-md-10 col-xs-10">
								<textarea rows="3" cols="" maxlength="2000" disabled="disabled" class="form-control m-input" id="value" name="value"></textarea>
							</div>
		        		</div>
		        	</div>
		        	<lui:ajax id="toBASE64Ajax" url="${ctx }/datum/devWidgets/toBase64" formQuery="#BASE64Frm" onSuccess="DevWidgetsPage.onConvertToBase64Succ"/>
		            <lui:ajax id="fromBASE64Ajax" url="${ctx }/datum/devWidgets/fromBase64" formQuery="#BASE64Frm" onSuccess="DevWidgetsPage.onConvertToBase64Succ"/>
		        </form>
		    </li>
		     <li data-id="JSONFrm">
		        <form id="JSONFrm" class='m-cust' style="margin-top: 10px;display:none;">
		        	<div class="form-group row m-narrow">
		        		<div class="col-sm-6 col-md-6 col-xs-6">
				        	<div class="col-sm-2 col-md-2 col-xs-2">
							    <label for="text" class="m-label required">文本</label>
							</div>
							<div class="col-sm-10 col-md-10 col-xs-10">
							    <textarea rows="9" cols="" maxlength="2000" class="form-control m-input" name="text"></textarea>
							</div>
						</div>
					</div>
					<div class="form-group row m-narrow">
		        		<div class="col-sm-6 col-md-6 col-xs-6">
		        			<div class="col-sm-2 col-md-2 col-xs-2">
							    <button class="btn btn-primary m-btn" type="button" onclick="DevWidgetsPage.toJsonFomat()">转化</button>
							</div>
							<div class="col-sm-10 col-md-10 col-xs-10">
								<textarea rows="9" cols="" maxlength="2000" class="form-control m-input" name="value" id="value"></textarea>
							</div>
		        		</div>
		        	</div>
		        	<lui:ajax id="toJsonFomatjax" url="${ctx }/datum/devWidgets/formatJson" formQuery="#JSONFrm" onSuccess="DevWidgetsPage.onJsonFomatterSucc"/>
		        </form>
		    </li>
		</ul>
	</lui:board>
	
</lui:boards>
</body>
</u:View>
</html>